import requests from './request'
//学生界面api
let urlmethods={};
//获取全部课程信息
const getstucourse=(name)=>{
    return requests.get('/getstucourse?username='+name)
}
//选课
const courseselect=(data)=>{
    return requests.post('/courseselect',data)
}
//退选
const courseregret=(data)=>{
    return requests.post('/courseregret',data);
}
//根据课程名称查询课程
const searchstucourse=(data)=>{
    return requests.post('/searchstucourse',data)
}
//获取学生账号的密码信息，修改密码
const getstuaccpwd=(name)=>{
    return requests.post('/getstuaccpwd',{username:name})
}
//学生修改密码
const editstuacc=(data)=>{
    return requests.post('/editstuacc',data);
}
//查看课程作业
const getstuhwinfo=(name)=>{
    return requests.get('/getstuhw?username='+name);
}
//查看具体的作业要求
const getconcretehw=(data)=>{
    return requests.post('/getconcretehw',data);
}
//学生根据课程名称查询作业
const searchstucoursehwbyname=(data)=>{
    return requests.post('/searchstucoursehwbyname',data)
}
urlmethods.searchstucoursehwbyname=searchstucoursehwbyname;
urlmethods.getconcretehw=getconcretehw;
urlmethods.getstuhwinfo=getstuhwinfo;
urlmethods.editstuacc=editstuacc;
urlmethods.getstuaccpwd=getstuaccpwd;
urlmethods.searchstucourse=searchstucourse;
urlmethods.courseregret=courseregret;
urlmethods.courseselect=courseselect;
urlmethods.getstucourse=getstucourse;
export default urlmethods;